#pragma once

#include <string>
#include <oclUtils.h>
#include <shrUtils.h>


class ocl_prog
{
public:

	virtual void init(const char* fIN, const char* fOUT);
	virtual void run();
	virtual void end();

protected:
	
	void parse( char *line_record, char *delim, float data_array[], int num);
	virtual void initMutInfoGPU(cl_context in_context, cl_device_id in_device);
	virtual void closeMutInfoGPU();
	virtual void MutInfoGPU(cl_command_queue hCmdQueue, cl_mem in_info, cl_mem in_arr, cl_int in_M, cl_int in_NUM_ROWS);

	cl_platform_id		platform;
	cl_device_id		device;
	cl_context			context;
	cl_command_queue	hCmdQueue;
	cl_mem				d_info;
	cl_mem				d_arr;

	int NUM_ROWS;
	int mem_size_info;
	FILE *_out;
	float *result;
	std::string programFile;
};

